package com.ray.util.baidu;

import org.json.JSONObject;

public class Test {
	public static void main(String[] args) throws Exception {
		
		//百度相同图片
		JSONObject jsonObject = null;
		Brief brief = new Brief("orderNo900", "materialCode2001","铂亮光学",1,"remark");
		/*jsonObject = BaiduSamePicSearchUtils.samePicInsertForLocal(brief, Tags.getSameTag("1", 1), "C:\\Users\\Administrator\\Desktop\\avatar.jpg");
		System.out.println(jsonObject);*/
		jsonObject = BaiduSamePicSearchUtils.samePicInsertForRemote(brief, Tags.getSameTag("1", 1), "https://upload.shinehao.com.cn/20181010175200avatar.jpg");
		System.out.println(jsonObject);
		jsonObject = BaiduSamePicSearchUtils.samePicInsertForRemote(brief, Tags.getSameTag("2", 1), "https://upload.shinehao.com.cn/20181010112316avatar.jpg");
		System.out.println(jsonObject);
		/*jsonObject = BaiduSamePicSearchUtils.samePicSelectForLocal( Tags.getSameTag("1", 1), ImageUtils.readLocal("C:\\\\Users\\\\Administrator\\\\Desktop\\\\avatar.jpg","GET"), 0, 0, 10);
		System.out.println(jsonObject);
		jsonObject = BaiduSamePicSearchUtils.samePicSelectForRemote( Tags.getSameTag("1", 1), "https://cafecodewordpress.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2018/09/cropped-avatar.jpg", 0, 0, 10);
		System.out.println(jsonObject);
		jsonObject = BaiduSamePicSearchUtils.samePicUpdateForLocal(brief, Tags.getSameTag("1", 1), "C:\\Users\\Administrator\\Desktop\\avatar.jpg");
		System.out.println(jsonObject);
		jsonObject = BaiduSamePicSearchUtils.samePicUpdateForRemote(brief, Tags.getSameTag("1", 1), "https://cafecodewordpress.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2018/09/cropped-avatar.jpg");
		System.out.println(jsonObject);
		jsonObject = BaiduSamePicSearchUtils.samePicDeleteForLocal("C:\\Users\\Administrator\\Desktop\\avatar.jpg");
		System.out.println(jsonObject);*/
		/*jsonObject = BaiduSamePicSearchUtils.samePicDeleteForRemote("https://upload.shinehao.com.cn/20181010112316avatar.jpg?watermark/2/text/aGVsbG8xMjM=/font/5Lu_5a6L/fontsize/580/fill/IzVDMjcyNw==/dissolve/1");
		System.out.println(jsonObject);*/
		
		//百度相似图片
		jsonObject =BaiduSimilarPicSearchUtils.similarPicInsertForLocal(brief, Tags.getSameTag("1", 1), "C:\\Users\\Administrator\\Desktop\\avatar.jpg");
		System.out.println(jsonObject);
		jsonObject =BaiduSimilarPicSearchUtils.similarPicInsertForRemote(brief, Tags.getSameTag("1", 1), "https://upload.shinehao.com.cn/20181010112316avatar.jpg");
		System.out.println(jsonObject);
		jsonObject =BaiduSimilarPicSearchUtils.similarPicSelectForLocal(Tags.getSameTag("1", 1), ImageUtils.readLocal("C:\\\\Users\\\\Administrator\\\\Desktop\\\\avatar.jpg","GET"), 0, 0, 10);
		System.out.println(jsonObject);
		jsonObject =BaiduSimilarPicSearchUtils.similarPicSelectForRemote( Tags.getSameTag("1", 1), "https://upload.shinehao.com.cn/20181005104136%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20180907082055.jpg", 0, 0, 10);
		System.out.println(jsonObject);
		/*jsonObject =BaiduSimilarPicSearchUtils.similarPicUpdateForLocal(brief, Tags.getSameTag("1", 2), "C:\\Users\\Administrator\\Desktop\\avatar.jpg");
		System.out.println(jsonObject);
		jsonObject =BaiduSimilarPicSearchUtils.similarPicUpdateForRemote(brief, Tags.getSameTag("1", 2), "https://upload.shinehao.com.cn/20181010112316avatar.jpg");
		System.out.println(jsonObject);
		jsonObject =BaiduSimilarPicSearchUtils.similarPicDeleteForLocal("C:\\Users\\Administrator\\Desktop\\avatar.jpg");
		System.out.println(jsonObject);*/
		jsonObject =BaiduSimilarPicSearchUtils.similarPicDeleteForRemote("https://upload.shinehao.com.cn/20181010112316avatar.jpg");
		System.out.println(jsonObject);
		
		//百度商品图片
		/*jsonObject =BaiduProductPicSearchUtils.productPicInsertForLocal(brief,  "C:\\Users\\Administrator\\Desktop\\avatar.jpg",1, 1);
		System.out.println(jsonObject);
		jsonObject =BaiduProductPicSearchUtils.productPicInsertForRemote(brief,  "https://upload.shinehao.com.cn/20181005104136%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20180907082055.jpg", 2, 2);
		System.out.println(jsonObject);
		jsonObject =BaiduProductPicSearchUtils.productPicSelectForLocal(ImageUtils.readLocal("C:\\Users\\Administrator\\Desktop\\avatar.jpg","GET"), 0, 10, 1, 1);
		System.out.println(jsonObject);
		jsonObject =BaiduProductPicSearchUtils.productPicSelectForRemote("https://upload.shinehao.com.cn/20181005104136%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20180907082055.jpg",0, 10, 2, 2);
		System.out.println(jsonObject);
		jsonObject =BaiduProductPicSearchUtils.productPicUpdateForLocal(brief,  "C:\\Users\\Administrator\\Desktop\\avatar.jpg", 10, 10);
		System.out.println(jsonObject);
		jsonObject =BaiduProductPicSearchUtils.productPicUpdateForRemote(brief,  "https://upload.shinehao.com.cn/20181005104136%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20180907082055.jpg", 20, 20);
		System.out.println(jsonObject);
		jsonObject =BaiduProductPicSearchUtils.productPicDeleteForLocal("C:\\Users\\Administrator\\Desktop\\avatar.jpg");
		System.out.println(jsonObject);
		jsonObject =BaiduProductPicSearchUtils.productPicDeleteForRemote("https://upload.shinehao.com.cn/20181005104136%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20180907082055.jpg");
		System.out.println(jsonObject);*/
	
	}
	
}
